<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            background-color: red;
        }
        .box2{
            width: 20px;
            height: 20px;
            background-color: rgb(106, 255, 0);
            text-align: center;
            line-height: 20px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    
    <div class="box">1
            <button class="box2"></button>
    </div>
    
    <script>
        let btn=document.querySelector(".box2");
        let div=document.querySelector(".box");
        btn.addEventListener("click",function(){
            div.style.display="none";
       })

    //    let a=document.querySelector("div")
    //    console.log(a.dataset.id);
    //    console.log(a.dataset.apn);
    // setInterval(a,100);
    // function a(){
    //     console.log("123");
    // }
    // let btn=document.querySelector("button");
    // btn.addEventListener("click",function(){
    //     console.log("123");
    // })
   
    
     


    </script>



</body>
</html>